<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>
</head>
<body>
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li>
          <input type="text" placeholder="请输入订单编号" id="adcode" name="adcode" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a>
        </li>
        <li>
          <label id="adtitle" style="width:250px; line-height:17px;display:inline-block"></label>
        </li>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="10%">日期</th>
        <th width="10%">开始时间</th>
        <th width="10%">曝光量</th>
        <th width="10%">1+量</th>
        <th width="10%">起始行</th>
        <th width="10%">结束行</th>
        <th width="10%">重合率</th>
      </tr>
      <tbody id="data_tb">	
			
      </tbody>
    </table>
  </div>
<script type="text/javascript">

//搜索
function changesearch(){	
	$("#data_tb").empty();
	var filter = $("#adcode").val();
	if(filter=="")
    {
		alert("请输入订单号...");
        return false;  // 返回false，a标签就会终止动作，不跳转
    }else{
    	var url = "order/queryschedule";
    	$.ajax({
    	    type: "get",
    	    url: url,
    	    data: "adcode="+filter,
    	    cache: false,
    	    async : false,
    	    dataType: "json",
    	    success: function (data,textStatus){
    	    		 var array  = eval(data); 
    	    		 var tablet = $("#title_tb");
	   	             var rowt = $("<tr></tr>");
	   	             var tdt = $("<td style='text-align: center;'>"+ array[0].adtitle + "</td>");
	   	             rowt.append(tdt);
	   	             tablet.append(rowt);
	   	             
	  	        	 for(var i=0;i<array.length;i++){
	   	        	 var table1 = $("#data_tb");
	   	             var row = $("<tr></tr>");
	   	             var td0 = $("<td style='text-align: center;'>"+ array[i].exposuredate + "</td>");
	   	             var td1 = $("<td style='text-align: center;'>"+ array[i].starttime + "</td>");
	   	             var td2 = $("<td style='text-align: center;'>"+ array[i].dayevt + "</td>");
	   	             var td3 = $("<td style='text-align: center;'>"+ array[i].dayev1 + "</td>");
	   	             var td4 = $("<td style='text-align: center;'>"+ array[i].startLine + "</td>");
	   	             var td5 = $("<td style='text-align: center;'>"+ array[i].endLine + "</td>");
	   	             var td6 = $("<td style='text-align: center;'>"+ array[i].repeat + "</td>");
	   	             row.append(td0);
	   	             row.append(td1);
	   	             row.append(td2);
	   	             row.append(td3);
	   	          	 row.append(td4);
	   	          	 row.append(td5);
	   	          	 row.append(td6);
	   	             table1.append(row);
  	        	 }
    	    }
    	 });
    }	
}
</script>
</body>
</html>